'use strict';

angular.module('CBO').controller('StorageLocationListController', ['$scope', 'BaseModule', 'BaseEnum', 'DataPushService', 'BaseFunction', 'Authentication',
    function($scope, BaseModule, BaseEnum, DataPushService, BaseFunction, Authentication) {
        BaseModule.initModule($scope, 'StorageLocation');
        $scope.Module.StorageLocation.LoadMode = BaseEnum.LoadMode.CacheAndPaging;
        $scope.Module.StorageLocation.PageSize = 15;

        var condition = {
            ErpID: {
                "$gt": 0
            }
        };

        $scope.Module.StorageLocation.Condition = condition;

        $scope.btnDataPush = function() {
            DataPushService.dataSync('UFIDA.U9.CBO.SCM.Warehouse.Warehouse').then(function(result) {
                BaseFunction.alert("数据同步", "数据同步成功");
            }, function(err) {
                BaseFunction.alert(err.message, err.title);
            });
        }
    }
]);